-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🧮 Environment-specific-testing for full frontend dependency control #2073
Draft
daquinteroflex
wants to merge
24
commits into
develop
Choose a base branch
from
dario/env_custom_tests
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daquinteroflex
force-pushed
the
dario/env_custom_tests
branch
from
November 15, 2024 11:16
0106d5d
to
c54ebc8
Compare
An important thing to note is that gdspy is not working with poetry in some configurations conflicts btw |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2062
The problem we need to solve is:
So just to document a few approaches I've considered for this:
tox
because it was not particularly clear what use it had in this context. For us, now, though some package on this lines seems reasonable.nox
because we have full reconfigurable control over the environment and testing process. I think, also, it is possible to fully decouple pytest and the environment run script like in tox as well. I quite likenox
because it's more functional and composable to a different set of tests without having to integrate this within a declarative pyproject.toml.pyproject.toml
. This involves restructuring the entire testing CI scripts again which were poetry-based. However, it would be possible to configuretox
to use thepoetry.lock
configuration so we have a full declarative control over what's happening.So there's no specific evident approach. I am inclined to explore a
tox
configuration where we can control certain packages to be removed from atidy3d
base installation - and if not usenox
.One of the difficulties here is how we choose to integrate poetry in this set of tests. Because poetry enables us to define valid environments for a given set of python versions, however, here we want to have
reconfigurable
environments. The usefulness ofpoetry
stems from being able to test environments that we fully control and can reproduce as per the current CI frontend tests. So based on the poetry documentation we know that tox and nox are both supported in different ways. The clearest way in my opinion to manage this is to have poetry-managed environments, from which we can remove the base dependencies, and that they control the running of the tests. It seems liketox
is the most supported tool to implement this so we'll need to migrate this accordingly.However, I looked more into the
tox
configuration docs for this application and realised it was going to be a nightmare. I am more inclined to usenox
based on this article and current flexibility it provides us. It is also good to seenox-poetry
` is supported actively accordingly.So this means the implementation plan is as follows:
test
base installation in order to install tidy3d and testing tools in a managed configuration only to avoid doing it raw in the CI.nox
controlled environment testingI've been advancing on this and ran into this issue that has me thinking about how to best manage these testing speedups accordingly.
Independently of the testing environment configuration we also need to migrate the way we categorize and run pytest within specific environments. I think the way to do the pytest grouping is through using markers. It makes sense for the markers to be the same as the environments in which they will be used.